* --------------------- Figure 4: Parallel trends: Firm-level employment growth
use "$data_path/database_company_level_emp_synthetic", clear 

forval y = 2011/2018 {

gen ind_post_temp = 0 
replace ind_post_temp = 1 if year == `y'

gen int`y' = ind_post_temp*ind_treated_company
drop ind_post_temp 
}


reghdfe emp_growth ind_post ind_treated_company int2012 int2013 int2014 int2015 ///
                     int2016 int2017, ///
	        		 absorb(industry_time_fe county_time_fe company_all_num)  vce(cluster company_all_num) noomit 
est sto def 
coefplot def, keep(int2012 int2013 int2014 int2015 ///
                  int2016 int2017 ) ///
                 vert nokey  addplot(line @b  @ul1 @ll1 @at, lcolor(navy maroon maroon) ///
                 clpattern(solid dash dash)) ///
                 graphregion(color(white)) ///
				 ciopts( lcolor(white)) ///
                 mfcolor(white)   ///
				 mcolor(navy)  ///
                 xtitle("", size(5)) ytitle("Coefficient Estimate", size(5))  levels(95) ///
				 ylabel(, labsize(5)) ///
				 yline(0, lcolor(black) lpattern(solid))  ///
				 xline(2.5, lcolor(black) lpattern(longdash)) ///
                 coeflabels(int2011 =" " int2012 =" " int2013 =" "  int2014 = "Index Exclusion" int2015 = " " ///
				   int2016 = " " int2017 = " " ) ///
				   xlabel(, labsize(5)) 	  
graph export "$figures_path/figure4.eps", replace
